import React from "react";

class Child extends React.Component{
  constructor(props){
    super(props)
    this.state = {name:"xxx"}
  }
  handleClick = ()=>{
    this.setState({
      name:"小米"
    })
  }
  render(){
    return(
      <>
        <div onClick={this.handleClick}>this is refChild {this.state.name}</div>
      </>
    )
  }
}
export default Child